package com.net.yl.entity;


import java.io.Serializable;

/**
 * create by cjx on 2022/6/6
 * 说明:
 */
public class ResponseEntity<T> implements Serializable {

    /**
     * 网络接口调用结果
     */
    public boolean success;

    /**
     * 接口所需数据
     */
    public T data;

    /**
     * 结果调用结果描述
     */
    public String message;

    // 额外数据
    public Object extra;

    public ResponseEntity() {

    }

    public ResponseEntity(boolean success, T data, String message) {
        this.success = success;
        this.data = data;
        this.message = message;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
